{% extends "student/stu_header.html" %}
{% block context %}
    <div class="page_header">
        <h3 align="center">罚款缴纳</h3>
    </div>
    <div class="container">
        <table class="table table-hover">
            <tr>
                <th scope="col">罚款类型</th>
                <th scope="col">罚款金额</th>
                <th scope="col">缴纳</th>
                <th scope="col">选择</th>
            </tr>
            </thead>
            <tbody>
            {% for penalty in penaltys %}
                <tr>
                    <td>{{ penalty.pen_type }}</td>
                    <td>{{ penalty.pen_money }}</td>
                    <td><button class="btn btn-danger" onclick="window.location.href='/pay_penalty?stu_pen_id={{ penalty.stu_pen_id }}'">缴纳</button></td>
                    {%if penalty.appeal == 0%}
                        <td><button class="btn btn-primary" onclick="window.location.href='/stu_appeal'">申诉</button></td>
                    {%else%}
                        <td><button class="btn btn-default">已申诉</button></td>
                    {%endif%}                 
                </tr>
            {% empty%}
                <div class="alert alert-info" role="alert">
                    <strong>恭喜</strong>
                    你没有罚款需要缴纳
                </div>
            {% endfor %}
            </tbody>
        </table>
    </div>
{% endblock context %}